<%@ include file="../../inc/init.jsp" %>

<%
	/** Write all information from the form to the GRE object and afterwards to the database **/
	
	GRE gre = new GRE();
	
	gre.setApplicant(Integer.parseInt(request.getParameter("applicant")));
	gre.setAnalytical(Integer.parseInt(request.getParameter("analytical")));
	gre.setAnalyticalPercent(Integer.parseInt(request.getParameter("analyticalPercent")));
	gre.setVerbal(Integer.parseInt(request.getParameter("verbal")));
	gre.setVerbalPercent(Integer.parseInt(request.getParameter("verbalPercent")));
	gre.setQuantitative(Integer.parseInt(request.getParameter("quantitative")));
	gre.setQuantitativePercent(Integer.parseInt(request.getParameter("quantitativePercent")));
	gre.setTotal(Integer.parseInt(request.getParameter("total")));
	gre.setTotalPercent(Integer.parseInt(request.getParameter("totalPercent")));
	gre.setType(request.getParameter("type"));
	gre.setMonth(Integer.parseInt(request.getParameter("month")));
	gre.setYear(Integer.parseInt(request.getParameter("year")));
	gre.setRegNo(request.getParameter("regNo"));
	
	response.sendRedirect("index.jsp?msg=" + gre.writeToDatabase());
	
%>